/*==============================================================================
FILE NAME: 02_data_preparation.do README
CREATED: 23 July 2025
==============================================================================*/

# Purpose
This script generates all intermediate and final .dta files required for figure and table construction in the analysis. It runs a sequence of data preparation scripts that process raw inputs into cleaned and merged datasets.

# Instructions for Replicators
- Ensure global paths are defined
- Confirm all directories exist
- Run script

# Notes
- Last file is only required for reproducing appendix results and can be commented out if necessary
- Intermediate and final outputs are stored in the processed_data folder.
- This script calls R using the `shell Rscript` command. To ensure this works on the replicator's device, the replicator should direct the path used in the `shell Rscript` command to the directory where Rscript.exe lies.
- This script also uses python in Activity Codes.do. If either a python script or R script is not compatible or operational with the replicator's version of Stata, the replicator can run these scripts independently; they should run either externally via Stata or internally via RStudio